<html>
<head>
	<title><?php echo $title ?> - CodeIgniter 2 Tutorial</title>
	<script type="text/javascript" src="<?php echo BASE_URL()?>appcode/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="<?php echo BASE_URL()?>appcode/third_party/jquery-validation/dist/jquery.validate.js"></script>
	<script type="text/javascript" src="<?php echo BASE_URL()?>appcode/third_party/jquery-validation/dist/additional-methods.js"></script>
	
	
	<!--<script type="text/javascript" src="../../appcode/third_party/tinymce/tinymce.min.js"></script>-->
	<!-- <script src="../../appcode/third_party/ckeditor/ckeditor.js"></script>-->

	<link href="<?php echo BASE_URL()?>appcode/third_party/froala/css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="<?php echo BASE_URL()?>appcode/third_party/froala/css/froala_editor.min.css" rel="stylesheet" type="text/css">

	<script src="<?php echo BASE_URL()?>appcode/third_party/froala/js/froala_editor.min.js"></script>

  <script>
    //  $(function(){
    //      $('#entrybody').editable({inlineMode: false});
		  //$("#entrybody").editable("option", "height", 300);
		  //$("#entrybody").editable("option", "imageUploadURL", "../../Upload/do_upload");
    //  });



	    $(function() {
        $('#entrybody').editable({
            
            imageUploadURL: '../../Upload/do_upload',

			inlineMode:false,
			height:300,            
            
			// Set the image error callback.
            imageErrorCallback: function (data) {
                // Bad link.
                if (data.errorCode == 1) {
					console.log('success');
                }

                // No link in upload response.
                else if (data.errorCode == 2) {
				console.log('no link');
                }

                // Error during file upload.
                else if (data.errorCode == 3) {
				console.log('error during file upload');
                }
            }
        })
    });


//   tinymce.init({
//    selector: "textarea",
//    theme: "modern",
//    plugins: [
//        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
//        "searchreplace wordcount visualblocks visualchars code fullscreen",
//        "insertdatetime media nonbreaking save table contextmenu directionality",
//        "emoticons template paste textcolor moxiemanager"
//    ],
//    toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
//    toolbar2: "print preview media | forecolor backcolor emoticons",
//    image_advtab: true,
//    templates: [
//        {title: 'Test template 1', content: 'Test 1'},
//        {title: 'Test template 2', content: 'Test 2'}
//    ]
//});


//CKEDITOR.replace( 'entrybody',{
//		"extraPlugins": "imagebrowser",
//		"imageBrowser_listUrl": "/path/to/images_list.json"} );


</script>


	
<style>
	.error{color:red;}
</style>

</head>
<body>
	<h1>CodeIgniter 2 Tutorial</h1>
	<hr>
	<br>

